Skip to content

♻️ 重构代码,升级为manifest v3#374

Merged
CodFrm merged 21 commits into
mainfrom
release/mv3
May 13, 2025
Merged

♻️ 重构代码,升级为manifest v3#374
CodFrm merged 21 commits into
mainfrom
release/mv3

Conversation

@CodFrm

@CodFrm CodFrm commented Apr 28, 2025

Copy link
Copy Markdown
Member
  • 全新的代码,webpack更换为rspack,npm更换为pnpm,让打包与开发速度更快
  • 重构扩展版本为manifest v3
  • 更换储存引擎IndexedDBchrome.storage.local

@CodFrm CodFrm requested a review from Copilot April 28, 2025 08:11
@CodFrm CodFrm self-assigned this Apr 28, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the project in preparation for Manifest V3, removing legacy configurations and files while upgrading several build and CI workflows.

  • Removed legacy files (Babel config, ESLint config, English README) no longer needed under Manifest V3
  • Updated README, CONTRIBUTING, and GitHub Actions workflows to use pnpm, Node 22, and newer action versions
  • Revised release workflow to streamline asset uploads using a consolidated release action

Reviewed Changes

Copilot reviewed 257 out of 268 changed files in this pull request and generated no comments.

Show a summary per file
File Description
build/assets/_locales/i18n.js Removed legacy i18n initialization code
babel.config.js Removed outdated Babel configuration
README_EN.md Removed redundant English documentation
README.md Updated with new setup instructions and project information
CONTRIBUTING.md Updated dependency installation instructions and proxy configuration
.github/workflows/test.yaml Upgraded action versions, node version, and switched to pnpm
.github/workflows/packageRelease.yml Consolidated release steps using a new release action
.github/workflows/build.yaml Updated build workflow with newer actions and pnpm usage
.eslintrc.cjs Removed legacy ESLint configuration
Files not reviewed (11)
  • .eslintignore: Language not supported
  • .prettierignore: Language not supported
  • .prettierrc: Language not supported
  • build/assets/_locales/zh_CN/messages.json: Language not supported
  • build/assets/template/background.html: Language not supported
  • build/assets/template/confirm.html: Language not supported
  • build/assets/template/import.html: Language not supported
  • build/assets/template/install.html: Language not supported
  • build/assets/template/options.html: Language not supported
  • build/assets/template/popup.html: Language not supported
  • build/assets/template/sandbox.html: Language not supported
Comments suppressed due to low confidence (2)

.eslintrc.cjs:1

  • The ESLint configuration has been entirely removed. Please ensure that linting rules are defined elsewhere to maintain code quality.
module.exports = {

.github/workflows/packageRelease.yml:33

  • Switching to ncipollo/release-action@v1 may change the asset upload behavior compared to the previous separate upload steps. Confirm that all expected release assets are correctly uploaded.
- uses: ncipollo/release-action@v1

DreamNya and others added 6 commits May 8, 2025 14:49
* 实现 @run-in / 分离隐身模式

@run-in api 显式声明脚本注入标签类型
 - `normal-tabs` 注入正常标签
 - `incognito-tabs` 注入隐身标签
缺省时、同时声明时,既注入正常标签又隐身标签
具体用法见新增示例

新增 `CacheStorage.prototype.clear` 清除所有缓存

同步更新`GM_info`

`manifest.json`显示声明`"incognito": "split"`分离浏览器隐身模式时扩展进程及上下文

`package.json`新增`dev-noMap`方法
 - 无`SourceMap`的`development`模式
(已知带`SourceMap`的`dev`模式会造成扩展的`service_work.js`无法完成注册,可能是浏览器限制或bug)

* 优化 仅隐身模式第一次初始化清理session

* fix

* fix allFrames

* 优化 run-in 实现

* 恢复逻辑

getUserScriptRegister 实际是get+set

* 恢复 Promise.all
@CodFrm CodFrm merged commit 9b283ef into main May 13, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants